<template>
  <div class="yiyuanxiangqing">
    <div class="box">
      <div class="top">体温详情</div>

      <div class="box_box">
        <div>测量日期</div>
        <p>{{data.riqi}} </p>
      </div>
      <div class="box_box">
        <div>测量时间</div>
        <p>{{data.zuijinceliang}}</p>
      </div>
      <div class="box_box">
        <div>体温</div>
        <p>{{data.tiwen}}</p>
      </div>

      <div class="button">
        <button @click="router.go(-1)">返回</button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { onMounted, reactive, ref } from "vue";
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();

let data = ref([])
// console.log(data);


onMounted(() => {
  data.value = JSON.parse(route.query.id)
  console.log(route.query);
})

</script>

<style lang="scss" scoped>
p {
  font-size: 24px;
  padding-left: 30px;
}
.yiyuanxiangqing {
  width: 100%;
  height: 100%;
  // background-color: gray;
  .box {
    width: 70%;
    height: 100%;
    background-color: white;
    margin: 0 auto;
    padding: 10px 50px;
    box-sizing: border-box;
    color: gray;
    .top {
      width: 100%;
      height: 50px;
      font-weight: 700;
      line-height: 50px;
      font-size: 24px;
      color: black;
    }
    .box_box {
      width: 100%;
      height: 80px;
      // background-color: lemonchiffon;
      line-height: 50px;
      display: flex;
      align-items: center;
      div {
        margin-right: 10px;
        color: black;
      }
      span {
        padding: 0 5px;
        background-color: gray;
        margin-right: 10px;
        color: black;
        box-sizing: border-box;
        height: 30px;
        line-height: 30px;
      }
    }
  }
  .button {
    width: 100%;
    height: 50px;
    // background-color: pink;
    // padding-left: p1x;
    margin-top: 30px;
    box-sizing: border-box;
    button {
      width: 90px;
      height: 40px;
      background-color: rgba(0, 0, 255, 0.488);
      border: 0;
      color: white;
    }
  }
}
</style>